package org.linuxsogood.boot.queue;

import cn.hutool.json.JSONUtil;
import com.example.demo.queue.dance.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author liu.hongwei
 * @since 2020/8/27 10:35
 */
public class DanceVoTest {

    public static void main(String[] args) {

        final List<DanceVo> dance = new ArrayList<>();

        final DanceVo lb1 = new DanceVo();
        lb1.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb1.setStartSeconds(0);
        lb1.setDuration(5);
        lb1.setLightBeltEffectEnum(LightBeltEffectEnum.LONG_BRIGHT);
        lb1.setPosition(LightBeltPositionEnum.HEAD);
        lb1.setColor("255,127,80");
        dance.add(lb1);

        final DanceVo lb2 = new DanceVo();
        lb2.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb2.setStartSeconds(0);
        lb2.setDuration(5);
        lb2.setLightBeltEffectEnum(LightBeltEffectEnum.BREATH_BLINKING);
        lb2.setPosition(LightBeltPositionEnum.LEFT_WING);
        lb2.setColor("255,20,147#255,0,255");
        dance.add(lb2);

        final DanceVo lb3 = new DanceVo();
        lb3.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb3.setStartSeconds(0);
        lb3.setDuration(5);
        lb3.setLightBeltEffectEnum(LightBeltEffectEnum.GRADUALLY_CHANGE_COLOR);
        lb3.setPosition(LightBeltPositionEnum.RIGHT_WING);
        lb3.setColor("255,20,147#255,0,255");
        dance.add(lb3);

        final DanceVo lb4 = new DanceVo();
        lb4.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb4.setStartSeconds(0);
        lb4.setDuration(5);
        lb4.setLightBeltEffectEnum(LightBeltEffectEnum.CIRCULATION_FLOW);
        lb4.setPosition(LightBeltPositionEnum.RIGHT_WING);
        lb4.setColor("255,215,0#218,165,32");
        lb4.setStreamDirection(1);
        lb4.setStreamSpeed(1.2);
        dance.add(lb4);

        final DanceVo lb5 = new DanceVo();
        lb5.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb5.setStartSeconds(5);
        lb5.setDuration(8);
        lb5.setLightBeltEffectEnum(LightBeltEffectEnum.AUTO_BY_MUSIC);
        lb5.setPosition(LightBeltPositionEnum.HEAD);
        lb5.setLightBeltAutoStyle(LightBeltAutoStyleEnum.ROMANTIC);
        dance.add(lb5);

        final DanceVo lb6 = new DanceVo();
        lb6.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb6.setStartSeconds(5);
        lb6.setDuration(8);
        lb6.setLightBeltEffectEnum(LightBeltEffectEnum.AUTO_BY_MUSIC);
        lb6.setPosition(LightBeltPositionEnum.LEFT_WING);
        lb6.setLightBeltAutoStyle(LightBeltAutoStyleEnum.SOFT);
        dance.add(lb6);

        final DanceVo lb7 = new DanceVo();
        lb7.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb7.setStartSeconds(5);
        lb7.setDuration(8);
        lb7.setLightBeltEffectEnum(LightBeltEffectEnum.AUTO_BY_MUSIC);
        lb7.setPosition(LightBeltPositionEnum.RIGHT_WING);
        lb7.setLightBeltAutoStyle(LightBeltAutoStyleEnum.SOFT);
        dance.add(lb7);

        final DanceVo lb8 = new DanceVo();
        lb8.setBaseType(DanceTypeEnum.LIGHT_BELT);
        lb8.setStartSeconds(5);
        lb8.setDuration(8);
        lb8.setLightBeltEffectEnum(LightBeltEffectEnum.AUTO_BY_MUSIC);
        lb8.setPosition(LightBeltPositionEnum.LEFT_WING);
        lb8.setLightBeltAutoStyle(LightBeltAutoStyleEnum.VIVID);
        dance.add(lb8);

        final DanceVo mb1 = new DanceVo();
        mb1.setBaseType(DanceTypeEnum.MOVEMENT);
        mb1.setDistance(1.0);
        mb1.setSpeed(0.8);
        mb1.setMovementType(MovementTypeEnum.CHASSIS);
        mb1.setMoveDirection(MoveDirectionEnum.FRONT);
        mb1.setStartSeconds(1);
        mb1.setDuration(5);
        dance.add(mb1);

        final DanceVo mb2 = new DanceVo();
        mb2.setBaseType(DanceTypeEnum.MOVEMENT);
        mb2.setDistance(1.0);
        mb2.setSpeed(0.8);
        mb2.setMovementType(MovementTypeEnum.CHASSIS);
        mb2.setMoveDirection(MoveDirectionEnum.BACKEND);
        mb2.setStartSeconds(6);
        mb2.setDuration(5);
        dance.add(mb2);

        final DanceVo mb3 = new DanceVo();
        mb3.setBaseType(DanceTypeEnum.MOVEMENT);
        mb3.setDistance(1.0);
        mb3.setSpeed(0.8);
        mb3.setMovementType(MovementTypeEnum.CHASSIS);
        mb3.setMoveDirection(MoveDirectionEnum.LEFT);
        mb3.setStartSeconds(11);
        mb3.setDuration(5);
        dance.add(mb3);

        final DanceVo mb4 = new DanceVo();
        mb4.setBaseType(DanceTypeEnum.MOVEMENT);
        mb4.setDistance(1.0);
        mb4.setSpeed(0.8);
        mb4.setMovementType(MovementTypeEnum.CHASSIS);
        mb4.setMoveDirection(MoveDirectionEnum.RIGHT);
        mb4.setStartSeconds(16);
        mb4.setDuration(5);
        dance.add(mb4);

        final DanceVo mbx = new DanceVo();
        mbx.setBaseType(DanceTypeEnum.MOVEMENT);
        mbx.setStartSeconds(3);
        mbx.setDuration(10);
        mbx.setMovementType(MovementTypeEnum.HEAD);
        mbx.setMoveDirection(MoveDirectionEnum.RIGHT);
        mbx.setRotateAngle(30.0);
        mbx.setHeadDirection(0);
        dance.add(mbx);

        final DanceVo mby = new DanceVo();
        mby.setBaseType(DanceTypeEnum.MOVEMENT);
        mby.setStartSeconds(13);
        mby.setDuration(10);
        mby.setRotateAngle(30.0);
        mby.setHeadDirection(1);
        mby.setMovementType(MovementTypeEnum.HEAD);
        mby.setMoveDirection(MoveDirectionEnum.LEFT);
        dance.add(mby);

        final DanceVo m1 = new DanceVo();
        m1.setBaseType(DanceTypeEnum.MEDIA);
        m1.setStartSeconds(0);
        m1.setDuration(8);
        m1.setMediaType(MediaTypeEnum.TEXT);
        m1.setBroadcastSpeed(1.0);
        m1.setContent("欢迎观看机器人表演, 下面请欣赏一剪梅!");
        dance.add(m1);

        final DanceVo m2 = new DanceVo();
        m2.setBaseType(DanceTypeEnum.MEDIA);
        m2.setStartSeconds(8);
        m2.setDuration(120);
        m2.setMediaType(MediaTypeEnum.AUDIO);
        m2.setContent("<iframe frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" width=330 height=86 src=\"//music.163.com/outchain/player?type=2&id=82932&auto=1&height=66\"></iframe>");
        dance.add(m2);

        final String s = JSONUtil.toJsonStr(dance);
        System.out.println(s);

    }
}
